<?php
class Order extends AppModel {

	var $name = 'Order';
	var $validate = array(
		'company' => array('notempty'),
		'email' => array('email'),
		'address' => array('notempty'),
		'delivered' => array('numeric'),
		'payed' => array('numeric'),
		'created' => array('date')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $hasMany = array(
		'OrdersProduct' => array(
			'className' => 'OrdersProduct',
			'foreignKey' => 'orders_id',
			'dependent' => false,
			'conditions' => '',
			'fields' => '',
			'order' => '',
			'limit' => '',
			'offset' => '',
			'exclusive' => '',
			'finderQuery' => '',
			'counterQuery' => ''
		)
	);
	
	var $belongsTo = array(
	   'User' => array('className' => 'User',
								'foreignKey' => 'user_id',
								'dependent' => true,
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'limit' => '',
								'offset' => '',
								'exclusive' => '',
								'finderQuery' => '',
								'counterQuery' => ''
						)
	);

}
?>